import { createRouter, createWebHashHistory } from 'vue-router'

const router = createRouter({
  history: createWebHashHistory(),
  routes: [
    {
      path: '/',
      redirect: '/index'
    },
    {
      path: '/index',
      name: 'home',
      component: () => import('@/views/first-page/first-index.vue'),
      children: [
        {
          path: 'content-management',
          name: 'content-management',
          component: () => import('@/views/content-management/content-index.vue')
        }
      ]
    },
    {
      path: '/login',
      name: 'login',
      component: () => import('@/views/login/login-index.vue')
    },
    {
      path: '/menu-management',
      name: 'menu-management',
      component: () => import('@/views/menu-management/menu-index.vue')
    },
    {
      path: '/long-list',
      name: 'long-list',
      component: () => import('@/views/long-list/long-list.vue')
    },
    {
      path: '/v-directive',
      name: 'v-directive',
      component: () => import('@/views/V-directive/v-directive.vue')
    },
    {
      path: '/object-freeze',
      name: 'object-freeze',
      component: () => import('@/views/Object-freeze/object-freeze.vue')
    },
    {
      path: '/next-tick',
      name: 'next-tick',
      component: () => import('@/views/Nexttick-refs/next-tick.vue')
    },
    {
      path: '/touchuan',
      name: 'touchuan',
      component: () => import('@/views/Transparent-transmission/grand-father.vue')
    },
    {
      path: '/slot',
      name: 'slot',
      component: () => import('@/views/V-slot/parent-slot.vue')
    },
    {
      path: '/jsx',
      name: 'jsx',
      component: () => import('@/views/jsx-demo/jsx-index.vue')
    },
    {
      path: '/render',
      name: 'render',
      component: () => import('@/views/render-demo/render-index.vue')
    },
    {
      path: '/ref-reactive',
      name: 'ref-reactive',
      component: () => import('@/views/ref-reactive/reactive-index.vue')
    },
    {
      path: '/echarts',
      name: 'echarts',
      component: () => import('@/views/echarts-demo/echarts-index.vue')
    },
    {
      path: '/worker-echarts',
      name: 'worker-echarts',
      component: () => import('@/views/worker-echarts/worker-echarts-index.vue')
    },
    {
      path: '/virtual-list',
      name: 'virtual-list',
      component: () => import('@/views/virtual-list/test-demo.vue')
    },
    {
      path: '/test-demo',
      name: 'test-demo',
      component: () => import('@/views/test-demo/test-demo-index.vue')
    },
    {
      path: '/test-sandian',
      name: 'test-sandian',
      component: () => import('@/views/test-sandian/test-sandian-index.vue')
    }
  ]
})

export default router
